﻿@model RTW.OA.Models.notify
@{
    ViewBag.Title = "公告通知审批";
    Layout = "~/Views/Shared/_LayoutBase.cshtml";
}

@section styles{

}
<div id="dMain">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox" style="margin-bottom: 0px;">
            <div class="ibox-title">
                <h4>@ViewBag.Title </h4>
            </div>
            <div class="ibox-content">
                @using (Html.BeginForm())
                {
                    @Html.AntiForgeryToken()
                    <div class="from-content">
                        <dl>
                            <dt>公告标题</dt>
                            <dd>
                                @Html.DisplayFor(model => model.SUBJECT, new { htmlAttributes = new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " } })
                            </dd>
                        </dl>
                        <dl>
                            <dt>发布人</dt>
                            <dd>
                                <div class="rule-single-select">
                                    @Html.DropDownListFor(model => model.TYPE_ID, new List<SelectListItem>(), new { @class = "form-control", datatype = "*", sucmsg = " " })
                                </div>
                            </dd>
                        </dl>
                        <dl>
                            <dt>发布范围</dt>
                            <dd>
                                @Html.TextAreaFor(model => model.TO_ID, new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " })
                                <a class="icon-btn add spec-btn"><span>添加</span></a>
                            </dd>
                        </dl>
                        <dl>
                            <dt>发布时间</dt>
                            <dd>
                                @Html.EditorFor(model => model.SEND_TIME, new { htmlAttributes = new { @Class = "input rule-date-input form-control", onfocus = "WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})", datatype = @"/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/", errormsg = "请选择正确的日期", sucmsg = " " } })
                            </dd>
                        </dl>
                        <dl>
                            <dt>有效期</dt>
                            <dd>
                                @Html.EditorFor(model => model.BEGIN_DATE, new { htmlAttributes = new { @Class = "input rule-date-input form-control", onfocus = "WdatePicker({maxDate:'#F{$dp.$D(\'END_DATE\')||\'2020-10-01\'}'})", datatype = @"/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/", errormsg = "请选择正确的日期", sucmsg = " " } })
                                至
                                @Html.EditorFor(model => model.END_DATE, new { htmlAttributes = new { @Class = "input rule-date-input form-control", onfocus = "WdatePicker({minDate:'#F{$dp.$D(\'BEGIN_DATE\')}',maxDate:'2020-10-01'})", datatype = @"/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/", errormsg = "请选择正确的日期", sucmsg = " " } })
                            </dd>
                        </dl>
                        <dl>
                            <dt>审批意见</dt>
                            <dd>
                                @Html.TextAreaFor(model => model.TO_ID, new { @class = "input normal form-control", datatype = "*2-100", sucmsg = " " })
                            </dd>
                        </dl>
                    </div>
                    <div class="from-footer">
                        <div class="btn-wrap" style="position: fixed;">
                            <a class="btn btn-sm btn-primary radius">
                                <i class="iconfont icon-save"></i>
                                提交保存
                            </a>
                            <a class="btn btn-sm btn-warning radius">
                                <i class="iconfont icon-fanhui"></i>
                                取消关闭
                            </a>
                        </div>
                    </div>
                }
            </div>
        </div>
    </div>
</div>
@section scripts{
    <script src="@Url.Content("~/Content/JS/common/WdatePicker/WdatePicker.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/JS/common/jquery/Validform_v5.3.2_min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/JS/common/artdialog/dialog-plus-min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/JS/common/webuploader/webuploader.min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/editor/ueditor.config.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/editor/ueditor.all.min.js")"></script>
    <script type="text/javascript" charset="utf-8" src="@Url.Content("~/Content/editor/lang/zh-cn/zh-cn.js")"></script>
    @*<script type="text/javascript" charset="utf-8" src="../js/uploader.js"></script>*@
    <script src="@Url.Content("~/Content/JS/common/from.js")"></script>

    <script>
        //初始化表单验证
        $("#form1").initValidform();

        //初始化编辑器
        $(".editor").each(function (i) {
            var objId = $(this).attr("id");
            if (objId != "undefined") {
                var editor = UE.getEditor(objId, {
                    serverUrl: '../../../Ashx/Upload_ajax.ashx',
                    initialFrameWidth: '100%',
                    initialFrameHeight: 350
                });
            }
        });
        $(".editor-mini").each(function (i) {
            var objId = $(this).attr("id");
            if (objId != "undefined") {
                var editorMini = UE.getEditor(objId, {
                    serverUrl: '../../../Ashx/Upload_ajax.ashx',
                    initialFrameWidth: '100%',
                    initialFrameHeight: 250,
                    toolbars: [[
                        'fullscreen', 'source', '|', 'undo', 'redo', '|',
                        'bold', 'italic', 'underline', 'strikethrough', 'removeformat', 'pasteplain', '|', 'forecolor', 'insertorderedlist', 'insertunorderedlist', '|',
                        'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
                        'link', 'unlink', 'anchor', '|',
                        'simpleupload', 'insertimage', 'scrawl', 'insertvideo'
                    ]]
                });
            }
        });
    </script>
}

